//    联系人信息页面:sellerBasic
//    公司信息页面:sellerCompany
//    corpFiles:法人身份证电子版（多图） 文件-->两张图
//    licenseFiles:营业执照副本电子版  文件
//    bankFiles:银行开户许可证电子版 文件
//    orgFiles:组织机构代码证电子版 文件
//    账务信息:sellerFinance
//    registFiles:税务登记电子版
//    taxCerFiles:一般纳税人资格证电子版
//    店铺页面:shopInfo
//    经营类目页面:shopTypes
//    店铺命名页面:shopNamed
//    审批form字段内容:sellerApprove
//
//    获取图片src接口地址,后面接图片id:imgSrc
var obj={
    "shopTypes": {
        "categoryMain": "茶叶",
        "classify": [{
            "categoryOneId": "1000047",
            "categoryOneNm": "茶叶",
            "categoryTwoId": "1000055",
            "categoryTwoNm": "黑茶",
            "id": 20
        },
            {
                "categoryOneId": "1000047",
                "categoryOneNm": "茶叶",
                "categoryTwoId": "1000054",
                "categoryTwoNm": "黄茶",
                "id": 21
            }],
        "id": 3,
        "qualityElc": "5cffeb24-c24a-4fc5-a398-e70fbf6f6fe2",
        "sellerId": "36a04b3b-219e-4639-a1c9-4bc1b850bcf7",
        "shopName": "店铺名称"
    },
    "orgFiles": [{
        "id": 124,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "e964b916-ba47-483f-887a-d71bcb5db30a",
        "resName": "a4.jpg",
        "resPath": "\\2016/12/09\\3ec8f159-0c4b-47f1-baab-1f8179aad401.jpg",
        "resSize": 5916,
        "resType": "image",
        "resUploadTime": "2016-12-09 16:51:42"
    }],
    "corpFiles": [{
        "id": 120,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "49fe87c6-b557-4ff1-aabf-b56f6803000f",
        "resName": "a1.jpg",
        "resPath": "\\2016/12/09\\f0a50050-3f74-4b22-9c94-a135ffde2b9c.jpg",
        "resSize": 3497,
        "resType": "image",
        "resUploadTime": "2016-12-09 16:51:14"
    },
        {
            "id": 121,
            "resAccount": "gzzq",
            "resExt": "jpg",
            "resId": "49fe87c6-b557-4ff1-aabf-b56f6803000f",
            "resName": "a2.jpg",
            "resPath": "\\2016/12/09\\20982d53-21f2-4efb-b2b9-8b78d595c18b.jpg",
            "resSize": 19568,
            "resType": "image",
            "resUploadTime": "2016-12-09 16:51:20"
        }],
    "sellerApprove": {
        "applyStep": "商家入驻信息提交申请",
        "approveResult": 11,
        "approveTime": "2016-12-09 16:53:49",
        "id": 1,
        "sellerId": "36a04b3b-219e-4639-a1c9-4bc1b850bcf7",
        "sellerName": "商家入驻联系人姓名"
    },
    "sellerBasic": {
        "applyProgress": 2,
        "applyResult": 13,
        "applyTime": "2016-12-12 10:04:20",
        "sellerId": "36a04b3b-219e-4639-a1c9-4bc1b850bcf7",
        "sellerMail": "12345678@qq.com",
        "sellerMobile": "13800138000",
        "sellerName": "商家入驻联系人姓名",
        "userAccount": "gzzq",
        "userId": "1f3cde6d-8d16-4299-a21b-b40a03a3b7f5"
    },
    "licenseFiles": [{
        "id": 122,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "6a9db132-2c15-423d-a073-56591ba715e4",
        "resName": "a3.jpg",
        "resPath": "\\2016/12/09\\f7a25388-2abc-4bfa-b801-74ec1868053d.jpg",
        "resSize": 6790,
        "resType": "image",
        "resUploadTime": "2016-12-09 16:51:24"
    }],
    "qualityFiles": [{
        "id": 136,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "5cffeb24-c24a-4fc5-a398-e70fbf6f6fe2",
        "resName": "a1.jpg",
        "resPath": "\\2016/12/12\\be202cf1-7cd4-44cc-bf38-43efd3e9516c.jpg",
        "resSize": 3497,
        "resType": "image",
        "resUploadTime": "2016-12-12 16:44:49"
    },
        {
            "id": 137,
            "resAccount": "gzzq",
            "resExt": "jpg",
            "resId": "5cffeb24-c24a-4fc5-a398-e70fbf6f6fe2",
            "resName": "a2.jpg",
            "resPath": "\\2016/12/12\\8ab640cf-5865-4e26-9ecf-29345d9abb8c.jpg",
            "resSize": 19568,
            "resType": "image",
            "resUploadTime": "2016-12-12 16:44:51"
        }],
    "bankFiles": [{
        "id": 123,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "f9ca430a-bb35-4bd2-9060-c5a20395c7cc",
        "resName": "a4.jpg",
        "resPath": "\\2016/12/09\\8a8c8164-9699-4b90-9a99-56ec296e06bb.jpg",
        "resSize": 5916,
        "resType": "image",
        "resUploadTime": "2016-12-09 16:51:27"
    }],
    "sellerCompany": {
        "bankAccLicElc": "f9ca430a-bb35-4bd2-9060-c5a20395c7cc",
        "bizArea": "南澳县",
        "bizBrovince": "广东",
        "bizCity": "汕头",
        "bizDetailAdd": "营业执照地址",
        "bizScope": "经营范围:茶叶茶具",
        "bizTermStart": "2012-12-01 00:00:00",
        "companyArea": "萝岗区",
        "companyBrovince": "广东",
        "companyCity": "广州",
        "companyDetailAdd": "中央绿地广场",
        "companyName": "广州优茶狂飙突进有限公司",
        "companyTel": "020-87654321",
        "corpIdentity": "256321212112124563",
        "corpIdentityElc": "49fe87c6-b557-4ff1-aabf-b56f6803000f",
        "corpName": "优茶达人",
        "id": 1,
        "identityType": 1,
        "licenseElc": "6a9db132-2c15-423d-a073-56591ba715e4",
        "licenseForever": 5,
        "licenseType": 1,
        "orgCode": "LOL8789",
        "orgCodeElc": "e964b916-ba47-483f-887a-d71bcb5db30a",
        "orgCodeEnd": "2016-12-30 00:00:00",
        "orgCodeStart": "2016-12-01 00:00:00",
        "personType": 1,
        "registerCapital": 65456,
        "registerDate": "2014-10-06 00:00:00",
        "registerNumber": "EOLF9898",
        "sellerId": "36a04b3b-219e-4639-a1c9-4bc1b850bcf7"
    },
    "sellerFinance": {
        "accountType": 1,
        "bankArea": "潮安县",
        "bankBrLine": "广州五山支行",
        "bankBrName": "中国工商银行",
        "bankBrovince": "广东",
        "bankCity": "潮州",
        "companyBankAcc": "6363561536255126695",
        "id": 1,
        "sellerId": "36a04b3b-219e-4639-a1c9-4bc1b850bcf7",
        "taxCerElc": "e4a9530a-f1f4-471f-af61-a56e6c451100",
        "taxIdentityNum": "NSRSBH14523",
        "taxRegistElc": "e1bdb3b6-d214-44ea-925a-1dfc4b93b4ac",
        "taxpayerTaxCode": 170,
        "taxpayerType": 2
    },
    "taxCerFiles": [{
        "id": 130,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "e4a9530a-f1f4-471f-af61-a56e6c451100",
        "resName": "a1.jpg",
        "resPath": "\\2016/12/12\\fb1b4a7c-d4d6-4260-bd8e-87bbd8a89a1d.jpg",
        "resSize": 3497,
        "resType": "image",
        "resUploadTime": "2016-12-12 16:34:23"
    },
        {
            "id": 131,
            "resAccount": "gzzq",
            "resExt": "jpg",
            "resId": "e4a9530a-f1f4-471f-af61-a56e6c451100",
            "resName": "a2.jpg",
            "resPath": "\\2016/12/12\\a6667c6a-3e74-4199-a8ca-04244fed0ae0.jpg",
            "resSize": 19568,
            "resType": "image",
            "resUploadTime": "2016-12-12 16:34:26"
        },
        {
            "id": 132,
            "resAccount": "gzzq",
            "resExt": "jpg",
            "resId": "e4a9530a-f1f4-471f-af61-a56e6c451100",
            "resName": "a3.jpg",
            "resPath": "\\2016/12/12\\a5b0b337-1d2f-42d3-baf8-c8dd62bd825b.jpg",
            "resSize": 6790,
            "resType": "image",
            "resUploadTime": "2016-12-12 16:34:28"
        }],
    "imgSrc": "/btdSite/sellerApply/getImg/",
    "registFiles": [{
        "id": 127,
        "resAccount": "gzzq",
        "resExt": "jpg",
        "resId": "e1bdb3b6-d214-44ea-925a-1dfc4b93b4ac",
        "resName": "a4.jpg",
        "resPath": "\\2016/12/09\\5745f0dc-aec6-44a3-8ddd-d423c3ee9f80.jpg",
        "resSize": 5916,
        "resType": "image",
        "resUploadTime": "2016-12-09 17:22:23"
    }]
}
//document.getElementById('tempCon').append(html);
$.ajax({
    type:'post',
    url:'',
    contentType : 'application/json;charset=utf-8',
    data:obj,
    dataType:'json',
    success:function(data){

    },
    error:function(){
    }
});
window.onload=function(){
    console.log(obj.shopTypes)
    var html = template('charterTemp', obj);
    var con=document.getElementsByClassName('container')[0];
    con.innerHTML=html;
    $(function(){
        $('img').on('click',function(){
            var th=$(this).attr('src');
            parent.layer.open({
                type: 1,
                title: false,
                maxmin:true,
                shadeClose: true,
                closeBtn: 1,
                area:['600px','500px'],
                skin: 'layui-layer-nobg', //没有背景色
                content: "<img width='600px' height='400px' src='"+th+"'>"
            })
        })
    })
}